<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html lang="en">
<head>
  <meta name="copyright" content=
  "Copyright (c) IBM Corporation and others 2000, 2011. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta http-equiv="Content-Style-Type" content="text/css">
  <link rel="STYLESHEET" href="../book.css" charset="ISO-8859-1" type="text/css">
  <title>Ant buildfiles as project builders</title>
</head>
<body>
  <h1>Ant buildfiles as project builders</h1>
  <p>Our second practical example of using Ant buildfiles in Eclipse is a 'project builder'. This is an Ant buildfile
  that has been designated to run whenever a project is built. The uses for such a buildfile are many:</p>
  <ul>
    <li>Generate a <code>.jar</code> file containing class files from your project</li>
    <li>Perform some type of pre- or post-build processing on source or binary files in your project. For example:
      <ul>
        <li>Pre-processing source files to instrument them for performance analysis</li>
        <li>Obfuscating binary files to prevent reverse engineering</li>
      </ul>
    </li>
    <li>Copy class files to some location (for instance, on a network)</li>
  </ul>
  <p>For this example, we will create an Ant buildfile that creates a <code>.jar</code> archive of the class files in a
  project. Note that this is similar to the example in the last chapter, in which we used an Ant buildfile to generate
  <code>.jar</code> files for an Eclipse plug-in. This example differs in that it works for any Eclipse project,
  whether or not it is also an Eclipse plug-in.</p>
  <h3 class="related">Related tasks</h3><a href="qs-82_create.htm">Creating Ant buildfiles</a><br>
  <a href="qs-83_edit.htm">Editing Ant buildfiles</a><br>
  <a href="qs-84_run_ant.htm">Running Ant buildfiles</a><br>
  <a href="qs-85_ant_configs.htm">Saving &amp; Reusing Ant options</a><br>
  <a href="qs-93_project_builder.htm">Creating a project builder Ant buildfile</a><br>
  <a href="qs-94_run_pj.htm">Executing project builders</a><br>
  <a href="qs-93a_project_builder_targets.htm">Project Builder Ant Targets</a><br>
  <a href="qs-95_external_tools.htm">External tools</a><br>
  <a href="qs-96_non_ant_pjs.htm">Non-Ant project builders</a><br>
  <a href="qs-97_standalone_ets.htm">Stand-alone external tools</a>
</body>
</html>
